package day19;

public class Count {
    public static void main(String[] args) {
        String s="abcadedfacae";
        char c='a';
        char ch[]=s.toCharArray();
        int sum=0;
        for (int i=0;i<ch.length;i++){
            if (c==ch[i]){
                sum++;
            }
        }
        System.out.println("字符串"+c+"出现的次数为："+sum);
    }
}
